# -*- coding: utf-8 -*-            
# @Author : liguang
# @Time : 2023/11/17 14:04

f = open("D:/guang.txt","a",encoding="UTF-8")
# 并不是这真正的将其写入到内存中，而是将其写入到缓冲中来
f.write("this is a apple")
f.write("\n")
f.write("this is a purple")
# close()方法中内置了flush方法
f.close()

